package sketch.generator.experiment;

import java.util.Collection;
import java.util.List;

import sketch.util.Checker;

public class SingleValue<T> extends ValueGroup<T> {
	
	public SingleValue(T...data) {
		super(data);
	}
	
	public SingleValue(Collection<T> data) {
		super(data);
	}

	@Override
	protected void checkDataValidity(Collection<T> data) {
		Checker.checkTrue(data.size() == 1, "The input data should contain exactly one element. not: " + data.size());
	}

	@Override
	protected void checkDataValidity(T... data) {
		Checker.checkTrue(data.length == 1, "The input data should contain exactly one element. not: " + data.length);
	}

	@Override
	public boolean isSingleData() {
		return true;
	}

	@Override
	public boolean isEmptyData() {
		return false;
	}

	@Override
	public boolean isMultiData() {
		return false;
	}

	
	
}
